importPackage(com.blocks.blocks);
importPackage(com.blocks);
importPackage(com.blocks.model);
importPackage(com.jme3.math);
importPackage(java.lang);
importPackage(com.blocks.script);
importPackage(com.jme3.math);
importPackage(com.jme3.collision);
importPackage(com.jme3.scene.debug);
importPackage(com.jme3.scene);
importPackage(com.jme3.material);
importPackage(com.blocks.gui);
var block = new Object(); 

var counter = 0;
block.setup = function(name) {
 	thisBlock.setName("Spawn NPC Block");
 	thisBlock.setTextureRow(1.0);
	thisBlock.setTextureColumn(5.0);
 	thisBlock.resetTexture();
	thisBlock.setCustomFrequency(true);
	thisBlock.setBlockListGroup(BlockListGroup.FREQUENCY);

	
  } 
block.loop = function(name, tpf) {
	var speedOfSpawn = thisBlock.getFrequency(thisBlock.getBlockSides()) > 1 ? thisBlock.getFrequency(thisBlock.getBlockSides())  : 1 ;
	if(counter>=(speedOfSpawn*10) && thisBlock.isPowered()){
		var masterId = System.currentTimeMillis();
var masterBlock = new MasterBlock("masterBlock", masterId);
	masterBlock.init();
	masterBlock.setLocalTranslation(thisBlock.getWorldTranslation());
	ScriptBlocksApplication.getInstance().getRootNode().attachChild(
			masterBlock);
	var Block858252196 = new Block("Block858252196", new Long(1309475672288));
	Block858252196.setBlockSides(BlockSides.SIDE_BACK);
	Block858252196.setCustomFrequency(true);
	Block858252196.setScriptName("/blocks/FrequencyGeneratorBlock.js");
	Block858252196.init();
	Block858252196.setLocalTranslation(new Vector3f(0.0, 0.0, 2.0));
	masterBlock.attachChild(Block858252196);
	var ColorBlock1348500462 = new ColorBlock("ColorBlock1348500462", new Long(
			1309475672288));
	ColorBlock1348500462.setBlockSides(BlockSides.SIDE_ABOVE);
	ColorBlock1348500462.init();
	ColorBlock1348500462.setLocalTranslation(new Vector3f(0.0, 2.0, 0.0));
	Block858252196.attachChild(ColorBlock1348500462);
	
	
	
	
	var Block419738381 = new Block("Block419738381", new Long(1309476685503));
	Block419738381.setBlockSides(BlockSides.SIDE_ABOVE);
	Block419738381.setCustomFrequency(true);
	Block419738381.setScriptName("/blocks/PlusOne.js");
	Block419738381.init();
	Block419738381.setLocalTranslation(new Vector3f(0.0, 2.0, 0.0));
	Block858252196.attachChild(Block419738381);
	var Block1444088003 = new Block("Block1444088003", new Long(1309476685503));
	Block1444088003.setBlockSides(BlockSides.SIDE_ABOVE);
	Block1444088003.setCustomFrequency(true);
	Block1444088003.setScriptName("/blocks/TwoX.js");
	Block1444088003.init();
	Block1444088003.setLocalTranslation(new Vector3f(0.0, 2.0, 0.0));
		Block419738381.attachChild(Block1444088003);
	var Block1430165102 = new Block("Block1430165102", new Long(1309476685503));
	Block1430165102.setBlockSides(BlockSides.SIDE_ABOVE);
	Block1430165102.setScriptName("/blocks/DirectionBlock.js");
	Block1430165102.init();
	Block1430165102.setLocalTranslation(new Vector3f(0.0, 2.0, 0.0));
	Block1430165102.getParameters().put("axis", 5.0);
		Block1444088003.attachChild(Block1430165102);
	
	
	
	
	
	
	
	
	var ColorBlock1056353585 = new ColorBlock("ColorBlock1056353585", new Long(
			1309475672288));
	ColorBlock1056353585.setBlockSides(BlockSides.SIDE_FRONT);
	ColorBlock1056353585.init();
	ColorBlock1056353585.setLocalTranslation(new Vector3f(0.0, 0.0, -2.0));
	ColorBlock1348500462.attachChild(ColorBlock1056353585);
	var ColorBlock91408888 = new ColorBlock("ColorBlock91408888", new Long(
			1309475672288));
	ColorBlock91408888.setBlockSides(BlockSides.SIDE_FRONT);
	ColorBlock91408888.init();
	ColorBlock91408888.setLocalTranslation(new Vector3f(0.0, 0.0, -2.0));
	ColorBlock1056353585.attachChild(ColorBlock91408888);
	var ColorBlock62388553 = new ColorBlock("ColorBlock62388553", new Long(
			1309475672288));
	ColorBlock62388553.setBlockSides(BlockSides.SIDE_FRONT);
	ColorBlock62388553.init();
	ColorBlock62388553.setLocalTranslation(new Vector3f(0.0, 0.0, -2.0));
	ColorBlock91408888.attachChild(ColorBlock62388553);
	var ColorBlock203593923 = new ColorBlock("ColorBlock203593923", new Long(
			1309475672288));
	ColorBlock203593923.setBlockSides(BlockSides.SIDE_ABOVE);
	ColorBlock203593923.init();
	ColorBlock203593923.setLocalTranslation(new Vector3f(0.0, 2.0, 0.0));
	ColorBlock62388553.attachChild(ColorBlock203593923);
	var ColorBlock489884999 = new ColorBlock("ColorBlock489884999", new Long(
			1309475672288));
	ColorBlock489884999.setBlockSides(BlockSides.SIDE_ABOVE);
	ColorBlock489884999.init();
	ColorBlock489884999.setLocalTranslation(new Vector3f(0.0, 2.0, 0.0));
	ColorBlock203593923.attachChild(ColorBlock489884999);
	var ColorBlock1396374784 = new ColorBlock("ColorBlock1396374784", new Long(
			1309475672288));
	ColorBlock1396374784.setBlockSides(BlockSides.SIDE_ABOVE);
	ColorBlock1396374784.init();
	ColorBlock1396374784.setLocalTranslation(new Vector3f(0.0, 2.0, 0.0));
	ColorBlock489884999.attachChild(ColorBlock1396374784);
	var ColorBlock373715814 = new ColorBlock("ColorBlock373715814", new Long(
			1309475672288));
	ColorBlock373715814.setBlockSides(BlockSides.SIDE_ABOVE);
	ColorBlock373715814.init();
	ColorBlock373715814.setLocalTranslation(new Vector3f(0.0, 2.0, 0.0));
	ColorBlock1396374784.attachChild(ColorBlock373715814);
	var ColorBlock1003517612 = new ColorBlock("ColorBlock1003517612", new Long(
			1309475672288));
	ColorBlock1003517612.setBlockSides(BlockSides.SIDE_RIGHT);
	ColorBlock1003517612.init();
	ColorBlock1003517612.setLocalTranslation(new Vector3f(-2.0, 0.0, 0.0));
	ColorBlock373715814.attachChild(ColorBlock1003517612);
	var ColorBlock1135440535 = new ColorBlock("ColorBlock1135440535", new Long(
			1309475672288));
	ColorBlock1135440535.setBlockSides(BlockSides.SIDE_RIGHT);
	ColorBlock1135440535.init();
	ColorBlock1135440535.setLocalTranslation(new Vector3f(-2.0, 0.0, 0.0));
	ColorBlock1003517612.attachChild(ColorBlock1135440535);
	var ColorBlock13400045 = new ColorBlock("ColorBlock13400045", new Long(
			1309475672288));
	ColorBlock13400045.setBlockSides(BlockSides.SIDE_ABOVE);
	ColorBlock13400045.init();
	ColorBlock13400045.setLocalTranslation(new Vector3f(0.0, 2.0, 0.0));
	ColorBlock1003517612.attachChild(ColorBlock13400045);
	var ColorBlock1080272569 = new ColorBlock("ColorBlock1080272569", new Long(
			1309475672288));
	ColorBlock1080272569.setBlockSides(BlockSides.SIDE_ABOVE);
	ColorBlock1080272569.init();
	ColorBlock1080272569.setLocalTranslation(new Vector3f(0.0, 2.0, 0.0));
	ColorBlock373715814.attachChild(ColorBlock1080272569);
	var ColorBlock518330987 = new ColorBlock("ColorBlock518330987", new Long(
			1309475672288));
	ColorBlock518330987.setBlockSides(BlockSides.SIDE_RIGHT);
	ColorBlock518330987.init();
	ColorBlock518330987.setLocalTranslation(new Vector3f(-2.0, 0.0, 0.0));
	ColorBlock489884999.attachChild(ColorBlock518330987);
	var ColorBlock599241819 = new ColorBlock("ColorBlock599241819", new Long(
			1309475672288));
	ColorBlock599241819.setBlockSides(BlockSides.SIDE_RIGHT);
	ColorBlock599241819.init();
	ColorBlock599241819.setLocalTranslation(new Vector3f(-2.0, 0.0, 0.0));
	ColorBlock518330987.attachChild(ColorBlock599241819);
	var ColorBlock1110446692 = new ColorBlock("ColorBlock1110446692", new Long(
			1309475672288));
	ColorBlock1110446692.setBlockSides(BlockSides.SIDE_ABOVE);
	ColorBlock1110446692.init();
	ColorBlock1110446692.setLocalTranslation(new Vector3f(0.0, 2.0, 0.0));
	ColorBlock599241819.attachChild(ColorBlock1110446692);
	var ColorBlock848675556 = new ColorBlock("ColorBlock848675556", new Long(
			1309475672288));
	ColorBlock848675556.setBlockSides(BlockSides.SIDE_LEFT);
	ColorBlock848675556.init();
	ColorBlock848675556.setLocalTranslation(new Vector3f(2.0, 0.0, 0.0));
	ColorBlock203593923.attachChild(ColorBlock848675556);
	var ColorBlock1455185507 = new ColorBlock("ColorBlock1455185507", new Long(
			1309475672288));
	ColorBlock1455185507.setBlockSides(BlockSides.SIDE_ABOVE);
	ColorBlock1455185507.init();
	ColorBlock1455185507.setLocalTranslation(new Vector3f(0.0, 2.0, 0.0));
	ColorBlock848675556.attachChild(ColorBlock1455185507);
	var ColorBlock963059655 = new ColorBlock("ColorBlock963059655", new Long(
			1309475672288));
	ColorBlock963059655.setBlockSides(BlockSides.SIDE_ABOVE);
	ColorBlock963059655.init();
	ColorBlock963059655.setLocalTranslation(new Vector3f(0.0, 2.0, 0.0));
	ColorBlock1455185507.attachChild(ColorBlock963059655);
	var ColorBlock236610312 = new ColorBlock("ColorBlock236610312", new Long(
			1309475672288));
	ColorBlock236610312.setBlockSides(BlockSides.SIDE_ABOVE);
	ColorBlock236610312.init();
	ColorBlock236610312.setLocalTranslation(new Vector3f(0.0, 2.0, 0.0));
	ColorBlock963059655.attachChild(ColorBlock236610312);
	var ColorBlock365783998 = new ColorBlock("ColorBlock365783998", new Long(
			1309475672288));
	ColorBlock365783998.setBlockSides(BlockSides.SIDE_LEFT);
	ColorBlock365783998.init();
	ColorBlock365783998.setLocalTranslation(new Vector3f(2.0, 0.0, 0.0));
	ColorBlock236610312.attachChild(ColorBlock365783998);
	var ColorBlock281957483 = new ColorBlock("ColorBlock281957483", new Long(
			1309475672288));
	ColorBlock281957483.setBlockSides(BlockSides.SIDE_LEFT);
	ColorBlock281957483.init();
	ColorBlock281957483.setLocalTranslation(new Vector3f(2.0, 0.0, 0.0));
	ColorBlock365783998.attachChild(ColorBlock281957483);
	var ColorBlock158992310 = new ColorBlock("ColorBlock158992310", new Long(
			1309475672288));
	ColorBlock158992310.setBlockSides(BlockSides.SIDE_ABOVE);
	ColorBlock158992310.init();
	ColorBlock158992310.setLocalTranslation(new Vector3f(0.0, 2.0, 0.0));
	ColorBlock365783998.attachChild(ColorBlock158992310);
	var ColorBlock637401887 = new ColorBlock("ColorBlock637401887", new Long(
			1309475672288));
	ColorBlock637401887.setBlockSides(BlockSides.SIDE_ABOVE);
	ColorBlock637401887.init();
	ColorBlock637401887.setLocalTranslation(new Vector3f(0.0, 2.0, 0.0));
	ColorBlock236610312.attachChild(ColorBlock637401887);
	var ColorBlock369099115 = new ColorBlock("ColorBlock369099115", new Long(
			1309475672288));
	ColorBlock369099115.setBlockSides(BlockSides.SIDE_LEFT);
	ColorBlock369099115.init();
	ColorBlock369099115.setLocalTranslation(new Vector3f(2.0, 0.0, 0.0));
	ColorBlock1455185507.attachChild(ColorBlock369099115);
	var ColorBlock720068811 = new ColorBlock("ColorBlock720068811", new Long(
			1309475672288));
	ColorBlock720068811.setBlockSides(BlockSides.SIDE_LEFT);
	ColorBlock720068811.init();
	ColorBlock720068811.setLocalTranslation(new Vector3f(2.0, 0.0, 0.0));
	ColorBlock369099115.attachChild(ColorBlock720068811);
	var ColorBlock330171174 = new ColorBlock("ColorBlock330171174", new Long(
			1309475672288));
	ColorBlock330171174.setBlockSides(BlockSides.SIDE_ABOVE);
	ColorBlock330171174.init();
	ColorBlock330171174.setLocalTranslation(new Vector3f(0.0, 2.0, 0.0));
	ColorBlock720068811.attachChild(ColorBlock330171174);
	var ColorBlock1440676759 = new ColorBlock("ColorBlock1440676759", new Long(
			1309475672288));
	ColorBlock1440676759.setBlockSides(BlockSides.SIDE_LEFT);
	ColorBlock1440676759.init();
	ColorBlock1440676759.setLocalTranslation(new Vector3f(2.0, 0.0, 0.0));
	ColorBlock848675556.attachChild(ColorBlock1440676759);
	var ColorBlock219815870 = new ColorBlock("ColorBlock219815870", new Long(
			1309475672288));
	ColorBlock219815870.setBlockSides(BlockSides.SIDE_LEFT);
	ColorBlock219815870.init();
	ColorBlock219815870.setLocalTranslation(new Vector3f(2.0, 0.0, 0.0));
	ColorBlock1440676759.attachChild(ColorBlock219815870);
	var ColorBlock578044939 = new ColorBlock("ColorBlock578044939", new Long(
			1309475672288));
	ColorBlock578044939.setBlockSides(BlockSides.SIDE_RIGHT);
	ColorBlock578044939.init();
	ColorBlock578044939.setLocalTranslation(new Vector3f(-2.0, 0.0, 0.0));
	ColorBlock203593923.attachChild(ColorBlock578044939);
	var ColorBlock1336769934 = new ColorBlock("ColorBlock1336769934", new Long(
			1309475672288));
	ColorBlock1336769934.setBlockSides(BlockSides.SIDE_RIGHT);
	ColorBlock1336769934.init();
	ColorBlock1336769934.setLocalTranslation(new Vector3f(-2.0, 0.0, 0.0));
	ColorBlock578044939.attachChild(ColorBlock1336769934);
	var ColorBlock1469865013 = new ColorBlock("ColorBlock1469865013", new Long(
			1309475672288));
	ColorBlock1469865013.setBlockSides(BlockSides.SIDE_LEFT);
	ColorBlock1469865013.init();
	ColorBlock1469865013.setLocalTranslation(new Vector3f(2.0, 0.0, 0.0));
	ColorBlock62388553.attachChild(ColorBlock1469865013);
	
	
	
	
	masterBlock.updatePower(true);
	
	masterBlock.updateMasterId(masterId);
	ScriptBlocksApplication.getInstance().addMasterBlock(
			masterBlock.getMasterId(), masterBlock);
	
	
	counter = 0;
	}	
	counter = counter+tpf;
 }
